<html>
    <script type="text/javascript">
	    document.write("<table border='1'>");
		document.write("<th>Number</th><th>Sum</th>")
		var sum=0;
		for(var i=1;i<=5;i++){
		 document.write("<tr>");
		 document.write("<td>"+i+"</td>");
		    for(var j=0;j<=i;j++){
			     sum+=j; 
		     }
		 document.write("<td>"+sum+"</td>");	 
		 document.write("</tr>");
		   sum=0;
		}
		document.write("</table>");
	</script>
</html>